# 打印 1-10
# for i in range(1, 11):
#     print(i)

# 打印 2, 4, 6, 8, 10
# for i in range(2, 12, 2):
#     print(i)

# 打印从 10 到 1
# num = 10
# while num >= 1:
#     print(num)
#     num -= 1

# for i in range(10, 0, -1):
#     print(i)

# 求 1 + 2 + 3 +...+ 100
theSum = 0
for i in range(1, 101):
    theSum += i
print(f'sum = {theSum}')